import 'package:boss/ui/page/staffTip/provider/staff_tip_provider.dart';
import 'package:boss/ui/page/staffTip/widget/staff_tip_list.dart';
import 'package:boss/ui/widget/calendar_bar.dart';
import 'package:hi_common/hi_common.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

class StaffTipBrowser extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Column(
      children: <Widget>[
        Container(
          margin: EdgeInsets.only(
            top: 30.w,
          ),
          padding: EdgeInsets.symmetric(
            horizontal: 30.w,
          ),
          child: Consumer<StaffTipProvider>(
            builder: (context, staffTipProvider, _) {
              return CalendarBar(
                startDateTime: staffTipProvider.startTime,
                endDateTime: staffTipProvider.endTime,
                onDateTimeChanged: staffTipProvider.setStartTime
              );
            },
          ),
        ),
        StaffTipList(),
      ],
    );
  }
}
